//
//  MovieTableViewCell.m
//  UI 作业 - 豆瓣电影
//
//  Created by hesiyao on 15/12/22.
//  Copyright © 2015年 www.lanou3g.com蓝鸥科技. All rights reserved.
//

#import "MovieTableViewCell.h"

@implementation MovieTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
   self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        self.view = [[UIImageView alloc] init];
        [self.contentView addSubview:_view];
        _view.backgroundColor = [UIColor whiteColor];
        
        self.imgview = [[UIImageView alloc] init];
        [_view addSubview:_imgview];
        _imgview.backgroundColor = [UIColor grayColor];
        
        self.titleLabel = [[UILabel alloc] init];
        [_view addSubview:_titleLabel];
//        _titleLabel.backgroundColor = [UIColor grayColor];
    }
    return self;
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    _view.frame = CGRectMake(20, 20, self.contentView.frame.size.width - 40, self.contentView.frame.size.height - 40);
    _imgview.frame = CGRectMake(10, 10, 100, _view.frame.size.height - 20);
    _titleLabel.frame = CGRectMake(140, 40, _view.frame.size.width / 3, 40);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
